<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       const gu=(ms)=>{
        return new Promise((resolve)=>{
            setTimeout(resolve,ms);
        });
       };
       const p1=gu(1000).then(()=>{
        console.log('p1以执行')
      return  Promise.reject('reason')
       }).catch((err)=>{
        console.log(err)
       })
       const p2=gu(2000).then(()=>{
        console.log('p2以执行')
        return  Promise.reject('reason2')
       }).catch((err)=>{
        console.log(err)
       })

       Promise.all([p1,p2]).then((data)=>{
        console.log(data)
       })
    </script>
</body>
</html>